Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MFE dynamic config #69

Merged
merged 1 commit into from
Dec 7, 2022
Merged

Conversation

ghassanmas
Copy link
Member

@ghassanmas ghassanmas commented Oct 16, 2022

Related to kdmccormick/pull/1

When building the docker image each MFE was built from the its crossponding PR:

The built image is pushed at https://hub.docker.com/r/16084536/mfe

How to test/USE

  • Install or update tutor from feat: Upgrade to Olive tutor#734
  • Install tutor-mfe from this PR/branch
  • Use the built mfe-image:
    • docker pull 16084536/mfe:olive.runtime.amd.1
    • tutor config save --set MFE_DOCKER_IMAGE=docker.io/16084536/mfe:olive.runtime.amd.1

Refs

Dockerfile (How did the Dockerfile looked like prior to build?)

Dockerfile source
    
  FROM docker.io/node:16.14-bullseye-slim AS base

RUN apt update \
  && apt install -y git \
    # required for cwebp-bin
    gcc git libgl1 libxi6 make \
    # additionally required for gifsicle, mozjpeg, and optipng (on arm)
    autoconf libtool pkg-config zlib1g-dev \
    # additionally required for node-sass (on arm)
    python g++

RUN mkdir -p /openedx/app /openedx/env
WORKDIR /openedx/app
ENV PATH ./node_modules/.bin:${PATH}

######## i18n strings
FROM base AS i18n
COPY ./i18n /openedx/i18n
RUN chmod a+x /openedx/i18n/*.js
RUN echo "copying i18n data" \
  && mkdir -p /openedx/i18n/account \
  && mkdir -p /openedx/i18n/gradebook \
  && mkdir -p /openedx/i18n/learning \
  && mkdir -p /openedx/i18n/profile \
  echo "done."



######## account (src)
FROM base AS account-src
RUN git clone https://github.com/openedx/frontend-app-account --branch open-release/olive.master --depth 1 .
RUN stat /openedx/app/src/i18n/messages 2> /dev/null || (echo "missing messages folder" && mkdir -p /openedx/app/src/i18n/messages)

######## account (i18n)
FROM base AS account-i18n
COPY --from=account-src /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
COPY --from=i18n /openedx/i18n/account /openedx/i18n/account
COPY --from=i18n /openedx/i18n/i18n-merge.js /openedx/i18n/i18n-merge.js
RUN /openedx/i18n/i18n-merge.js /openedx/app/src/i18n/messages /openedx/i18n/account /openedx/app/src/i18n/messages

######## account (dev)
FROM base AS account-dev
COPY --from=account-src /openedx/app/package.json /openedx/app/package.json
COPY --from=account-src /openedx/app/package-lock.json /openedx/app/package-lock.json
ARG NPM_REGISTRY=https://registry.npmjs.org/


ENV CPPFLAGS=-DPNG_ARM_NEON_OPT=0

ENV PACT_SKIP_BINARY_INSTALL=true
RUN npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY \
  && rm -rf ~/.npm

COPY --from=account-src /openedx/app /openedx/app
COPY --from=account-i18n /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
ENV PUBLIC_PATH='/account/'
EXPOSE 1997
CMD ["npm", "run", "start"]



######## gradebook (src)
FROM base AS gradebook-src
RUN git clone https://github.com/eduNEXT/frontend-app-gradebook --branch dcoa/runtime-favicon-title --depth 1 .
RUN stat /openedx/app/src/i18n/messages 2> /dev/null || (echo "missing messages folder" && mkdir -p /openedx/app/src/i18n/messages)

######## gradebook (i18n)
FROM base AS gradebook-i18n
COPY --from=gradebook-src /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
COPY --from=i18n /openedx/i18n/gradebook /openedx/i18n/gradebook
COPY --from=i18n /openedx/i18n/i18n-merge.js /openedx/i18n/i18n-merge.js
RUN /openedx/i18n/i18n-merge.js /openedx/app/src/i18n/messages /openedx/i18n/gradebook /openedx/app/src/i18n/messages

######## gradebook (dev)
FROM base AS gradebook-dev
COPY --from=gradebook-src /openedx/app/package.json /openedx/app/package.json
COPY --from=gradebook-src /openedx/app/package-lock.json /openedx/app/package-lock.json
ARG NPM_REGISTRY=https://registry.npmjs.org/


ENV CPPFLAGS=-DPNG_ARM_NEON_OPT=0

ENV PACT_SKIP_BINARY_INSTALL=true
RUN npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY \
  && rm -rf ~/.npm

COPY --from=gradebook-src /openedx/app /openedx/app
COPY --from=gradebook-i18n /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
ENV PUBLIC_PATH='/gradebook/'
EXPOSE 1994
CMD ["npm", "run", "start"]



######## learning (src)
FROM base AS learning-src
RUN git clone https://github.com/eduNEXT/frontend-app-learning --branch dcoa/runtime-favicon-title --depth 1 .
RUN stat /openedx/app/src/i18n/messages 2> /dev/null || (echo "missing messages folder" && mkdir -p /openedx/app/src/i18n/messages)

######## learning (i18n)
FROM base AS learning-i18n
COPY --from=learning-src /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
COPY --from=i18n /openedx/i18n/learning /openedx/i18n/learning
COPY --from=i18n /openedx/i18n/i18n-merge.js /openedx/i18n/i18n-merge.js
RUN /openedx/i18n/i18n-merge.js /openedx/app/src/i18n/messages /openedx/i18n/learning /openedx/app/src/i18n/messages

######## learning (dev)
FROM base AS learning-dev
COPY --from=learning-src /openedx/app/package.json /openedx/app/package.json
COPY --from=learning-src /openedx/app/package-lock.json /openedx/app/package-lock.json
ARG NPM_REGISTRY=https://registry.npmjs.org/


ENV CPPFLAGS=-DPNG_ARM_NEON_OPT=0

ENV PACT_SKIP_BINARY_INSTALL=true
RUN npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY \
  && rm -rf ~/.npm

COPY --from=learning-src /openedx/app /openedx/app
COPY --from=learning-i18n /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
ENV PUBLIC_PATH='/learning/'
EXPOSE 2000
CMD ["npm", "run", "start"]



######## profile (src)
FROM base AS profile-src
RUN git clone https://github.com/eduNEXT/frontend-app-profile --branch dcoa/runtime-favicon-title --depth 1 .
RUN stat /openedx/app/src/i18n/messages 2> /dev/null || (echo "missing messages folder" && mkdir -p /openedx/app/src/i18n/messages)

######## profile (i18n)
FROM base AS profile-i18n
COPY --from=profile-src /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
COPY --from=i18n /openedx/i18n/profile /openedx/i18n/profile
COPY --from=i18n /openedx/i18n/i18n-merge.js /openedx/i18n/i18n-merge.js
RUN /openedx/i18n/i18n-merge.js /openedx/app/src/i18n/messages /openedx/i18n/profile /openedx/app/src/i18n/messages

######## profile (dev)
FROM base AS profile-dev
COPY --from=profile-src /openedx/app/package.json /openedx/app/package.json
COPY --from=profile-src /openedx/app/package-lock.json /openedx/app/package-lock.json
ARG NPM_REGISTRY=https://registry.npmjs.org/


ENV CPPFLAGS=-DPNG_ARM_NEON_OPT=0

ENV PACT_SKIP_BINARY_INSTALL=true
RUN npm install --legacy-peer-deps --no-audit --no-fund --registry=$NPM_REGISTRY \
  && rm -rf ~/.npm

COPY --from=profile-src /openedx/app /openedx/app
COPY --from=profile-i18n /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
ENV PUBLIC_PATH='/profile/'
EXPOSE 1995
CMD ["npm", "run", "start"]





######## account (production)
FROM account-dev AS account
COPY ./env/production /openedx/env/production
RUN touch /openedx/env/production.override \
  && echo "COACHING_ENABLED=''" >> /openedx/env/production.override \
  && echo "ENABLE_DEMOGRAPHICS_COLLECTION=''" >> /openedx/env/production.override \
  && echo "APP_ID='ACCOUNT'" >> /openedx/env/production.override \
  && echo "done setting production overrides"
RUN bash -c "set -a && source /openedx/env/production && source /openedx/env/production.override && npm run build"



######## gradebook (production)
FROM gradebook-dev AS gradebook
COPY ./env/production /openedx/env/production
RUN touch /openedx/env/production.override \
  && echo "APP_ID='GRADEBOOK'" >> /openedx/env/production.override \
  && echo "done setting production overrides"
RUN bash -c "set -a && source /openedx/env/production && source /openedx/env/production.override && npm run build"



######## learning (production)
FROM learning-dev AS learning
COPY ./env/production /openedx/env/production
RUN touch /openedx/env/production.override \
  && echo "APP_ID='LEARNING'" >> /openedx/env/production.override \
  && echo "done setting production overrides"
RUN bash -c "set -a && source /openedx/env/production && source /openedx/env/production.override && npm run build"



######## profile (production)
FROM profile-dev AS profile
COPY ./env/production /openedx/env/production
RUN touch /openedx/env/production.override \
  && echo "ENABLE_LEARNER_RECORD_MFE='true'" >> /openedx/env/production.override \
  && echo "APP_ID='PROFILE'" >> /openedx/env/production.override \
  && echo "done setting production overrides"
RUN bash -c "set -a && source /openedx/env/production && source /openedx/env/production.override && npm run build"



####### final production image with all static assets
FROM docker.io/caddy:2.4.6 as production

RUN mkdir -p /openedx/dist

# Copy static assets

COPY --from=account /openedx/app/dist /openedx/dist/account

COPY --from=gradebook /openedx/app/dist /openedx/dist/gradebook

COPY --from=learning /openedx/app/dist /openedx/dist/learning

COPY --from=profile /openedx/app/dist /openedx/dist/profile


# Copy caddy config file
COPY ./Caddyfile /etc/caddy/Caddyfile

env/production

env/production
   
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
BASE_URL=apps.local.overhang.io
CSRF_TOKEN_API_PATH=/csrf/api/v1/token
CREDENTIALS_BASE_URL=
DISCOVERY_API_BASE_URL=
ECOMMERCE_BASE_URL=
ENABLE_NEW_RELIC=false
FAVICON_URL=http://local.overhang.io/favicon.ico
LANGUAGE_PREFERENCE_COOKIE_NAME=openedx-language-preference
LMS_BASE_URL=http://local.overhang.io
LOGIN_URL=http://local.overhang.io/login
LOGO_URL=http://local.overhang.io/theming/asset/images/logo.png
LOGO_TRADEMARK_URL=http://local.overhang.io/theming/asset/images/logo.png
LOGO_WHITE_URL=
LOGOUT_URL=http://local.overhang.io/logout
MARKETING_SITE_BASE_URL=http://local.overhang.io
NODE_ENV=production
PUBLISHER_BASE_URL=
REFRESH_ACCESS_TOKEN_ENDPOINT=http://local.overhang.io/login_refresh
SEGMENT_KEY=
SITE_NAME=My\ Open\ edX
STUDIO_BASE_URL=http://studio.local.overhang.io
USER_INFO_COOKIE_NAME=user-info
MFE_CONFIG_API_URL=/api/mfe_config/v1

Caddyfile

Caddyfile
:8002 {

    
    @mfe_account {
        path /account /account/*
    }
    handle @mfe_account {
        uri strip_prefix /account
        root * /openedx/dist/account
        try_files /{path} /index.html
        file_server
    }
    
    @mfe_gradebook {
        path /gradebook /gradebook/*
    }
    handle @mfe_gradebook {
        uri strip_prefix /gradebook
        root * /openedx/dist/gradebook
        try_files /{path} /index.html
        file_server
    }
    
    @mfe_learning {
        path /learning /learning/*
    }
    handle @mfe_learning {
        uri strip_prefix /learning
        root * /openedx/dist/learning
        try_files /{path} /index.html
        file_server
    }
    
    @mfe_profile {
        path /profile /profile/*
    }
    handle @mfe_profile {
        uri strip_prefix /profile
        root * /openedx/dist/profile
        try_files /{path} /index.html
        file_server
    }
    

}

Copy link
Contributor

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for continuing work on this @ghassanmas . I have a few concerns that I think can be addressed by things I learned when working on this myself.

tutormfe/plugin.py Outdated Show resolved Hide resolved
tutormfe/patches/openedx-lms-production-settings Outdated Show resolved Hide resolved
tutormfe/plugin.py Outdated Show resolved Hide resolved
tutormfe/patches/openedx-lms-production-settings Outdated Show resolved Hide resolved
tutormfe/patches/openedx-lms-production-settings Outdated Show resolved Hide resolved
tutormfe/plugin.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all, a good approach. I added comments/suggestions above.

tutormfe/patches/openedx-lms-production-settings Outdated Show resolved Hide resolved
tutormfe/patches/openedx-lms-production-settings Outdated Show resolved Hide resolved
tutormfe/plugin.py Outdated Show resolved Hide resolved
tutormfe/plugin.py Outdated Show resolved Hide resolved
@arbrandes
Copy link
Collaborator

arbrandes commented Nov 9, 2022

See #81. We also need to update the README as part of the PR.

Cancel that. It's an unrelated issue.

Copy link
Collaborator

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, so far! I made a couple of requests for changes, though.

tutormfe/patches/cms-env-features Outdated Show resolved Hide resolved
tutormfe/patches/openedx-cms-common-settings Outdated Show resolved Hide resolved
tutormfe/patches/openedx-lms-production-settings Outdated Show resolved Hide resolved
tutormfe/plugin.py Outdated Show resolved Hide resolved
tutormfe/templates/mfe/tasks/lms/init Outdated Show resolved Hide resolved
@regisb
Copy link
Contributor

regisb commented Nov 17, 2022

FYI I'm not closely monitoring this PR. It seems that you three are having very a productive conversation and I trust you to reach the right decisions. Feel free to @ me at any point, though.

tutormfe/plugin.py Outdated Show resolved Hide resolved
@ghassanmas ghassanmas force-pushed the mfe-dynamic-config branch 2 times, most recently from 8e6eb70 to 2bff31b Compare November 22, 2022 07:14
Copy link
Collaborator

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're getting there, @ghassanmas! Thanks for the changes so far. I made some additional comments.

tutormfe/patches/openedx-lms-production-settings Outdated Show resolved Hide resolved
tutormfe/templates/mfe/build/mfe/Dockerfile Outdated Show resolved Hide resolved
tutormfe/templates/mfe/build/mfe/Dockerfile Outdated Show resolved Hide resolved
tutormfe/templates/mfe/build/mfe/Dockerfile Outdated Show resolved Hide resolved
tutormfe/templates/mfe/build/mfe/Dockerfile Outdated Show resolved Hide resolved
tutormfe/templates/mfe/build/mfe/Dockerfile Outdated Show resolved Hide resolved
tutormfe/templates/mfe/build/mfe/env/production Outdated Show resolved Hide resolved
tutormfe/patches/openedx-lms-production-settings Outdated Show resolved Hide resolved
tutormfe/patches/openedx-lms-development-settings Outdated Show resolved Hide resolved
tutormfe/patches/openedx-lms-development-settings Outdated Show resolved Hide resolved
tutormfe/plugin.py Outdated Show resolved Hide resolved
@arbrandes
Copy link
Collaborator

@ghassanmas, can you also rebase on master, please?

@ghassanmas
Copy link
Member Author

@arbrandes you mean rebsing the PR or the branch?

@arbrandes
Copy link
Collaborator

@ghassanmas, I mean your mfe-dynamic-config branch, which after you push should also rebase the PR. It looks like you'll need to resolve a conflict.

@regisb
Copy link
Contributor

regisb commented Dec 1, 2022

From what I understand (@regisb, correct me if I'm wrong) nightly contains any changes that are too risky or radical to have in master. These changes will most likely land in the next release (in the current case, Olive), but we should first give them a whirl in nightly.

At this point, with Olive being so close to release, I think it's fine if we merge either in the Olive or the nightly branch. In Olive you'll be able to push --force changes. Whatever is easiest for you guys.

By the way, I'm guessing that you have to frequently merge nightly in olive, and then rebase your changes on top of it. I'd like to attract your attention to the git rebase --rebase-merges option. When rebasing interactively, you'll almost certainly want to run:

git rebase -i --rebase-merges master

(this is what I'm doing with the olive branch of tutor core)

@arbrandes
Copy link
Collaborator

@regisb

I'm guessing that you have to frequently merge nightly in olive

At least I'm not. I'm intentionally forgetting the olive branch exists, and instead focusing on nightly. When we're sure of the feature-set we want for Olive (including which MFEs) and we're on top of the release, I'll pull nightly into olive and do whatever else the upgrade requires.

git rebase -i --rebase-merges

I did not know --rebase-merges existed, and... can't say I'm really a fan. This is because I'm not a fan of merge commits in the first place, preferring a rebase workflow wherever possible. But I can see how this would be useful in certain cases.

tutormfe/patches/openedx-lms-development-settings Outdated Show resolved Hide resolved
@@ -14,3 +14,31 @@ PROFILE_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}http://{% en
LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}")
CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}")
CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}")

ALLOWED_HOSTS.append("{{ MFE_HOST }}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed now if it wasn't needed before?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember the exact reason, may be because now LMS would recevice a request from MFE_HOST as a proxy, might not be necessary but then would need to double test again

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I looked into it a bit more. From https://docs.djangoproject.com/en/4.1/ref/settings/#allowed-hosts:

ALLOWED_HOSTS
A list of strings representing the host/domain names that this Django site can serve.

Given the new proxying, it make sense that we need this 👍🏻

Please just add a brief comment to this line explaining that we need it so that the LMS can serve API requests with MFE_HOST as a proxy.

Copy link
Contributor

@regisb regisb Dec 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having a second look at this. I think that the "right" way to do this is not to modify ALLOWED_HOSTS, which is a sensitive setting, but to modify the Caddy configuration to automatically modify the "Host" header on forwarding to the LMS. I'll open a PR.

EDIT: here is the PR https://github.com/overhangio/tutor-mfe/pull/97/files

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it can rewrite the headers, I was able to remove that line while changing the caddy patch to

    reverse_proxy /api/mfe_config/v1* lms:8000 {
        header_up Host {http.reverse_proxy.upstream.hostport}
    }

That did it for me.

tutormfe/plugin.py Show resolved Hide resolved
tutormfe/plugin.py Show resolved Hide resolved
 This change does a couple of things and it introduce breaking
 changes, in summary it does:
  - It remove the usage of env/(productoin/development)
  - It's no longer possible to set/override MFE config via
    MFE_APP_*
  - It make MFEs rely to config that are defied in LMS
    settins
  - Other essetinal config that are needed at build time are
    are defined in the Dockerfile
  - It sets a proxy for both Caddy (for production) and Webpack
    (for development)
  - For old patches that are used to set/override MFE config, via
    production/development would need to be rewritten
@kdmccormick
Copy link
Contributor

@arbrandes @ghassanmas have either of you found this to work in dev mode? I am finding:

  • gradebook loads 👍🏻
  • account loads 👍🏻
  • profile's npm build fails with: TypeError: cli.isMultipleCompiler is not a function
  • learning starts loading, but it doesn't call the MFE config API. It falls back to the default devstack course API urls (http://localhost:18000/...), which causes the page to hang.

Copy link
Contributor

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think this needs more thorough testing, but if others are OK with it, I'm OK with doing that after merging.

Thanks for all your hard work on this Ghassan!

@arbrandes
Copy link
Collaborator

@kdmccormick, I have yet to test dev mode in any depth, but it sounds to me like those could be upstream issues. In any case, I'll actually test and report back.

@regisb
Copy link
Contributor

regisb commented Dec 6, 2022

I did not know --rebase-merges existed, and... can't say I'm really a fan. This is because I'm not a fan of merge commits in the first place, preferring a rebase workflow wherever possible. But I can see how this would be useful in certain cases.

(totally a sidenote) I agree with you @arbrandes. When I proposed the merging model for the nightly branch, it was really for the lack of any better option with rebase. If you have any better idea then I'm very much open to suggestions. (but let's discuss this after this PR is merged 😄)

ghassanmas added a commit to ghassanmas/frontend-app-gradebook that referenced this pull request Dec 6, 2022
  This change make it possible if LMS url to be changed, that
  the last value will be picked.

  This is simlair openedx/frontend-app-authoring/pull/389
  which issue overhangio/tutor-mfe/issues/86, the fixes is needed
  so that dynamic config would work with tutor:
  overhangio/tutor-mfe/pull/69
@arbrandes arbrandes added this to the Olive.1 milestone Dec 6, 2022
@arbrandes arbrandes added enhancement New feature or request release blocker labels Dec 6, 2022
@arbrandes
Copy link
Collaborator

arbrandes commented Dec 7, 2022

Here are the results of my testing.

tutor local

I've tested this via tutor local in nightly, and could not find anything broken with our currently supported MFEs except Gradebook, but there's already an issue and PR for that (openedx/wg-build-test-release#236).

tutor dev

As for tutor dev:

@kdmccormick

  • learning starts loading, but it doesn't call the MFE config API

I could not reproduce this:

screenshot

I am seeing a console warning, but that doesn't seem to affect the functioning of the MFE at all. (I'd venture a guess that this would show in the devstack as well, though I haven't tried reproducing it there, yet.)

Warning: Failed prop type: The prop `id` is marked as required in `ForwardRef(DropdownToggle)`, but its value is `undefined`.
  • profile's npm build fails with: TypeError: cli.isMultipleCompiler is not a function

Could not reproduce this, either. Maybe if you can provide more details on your environment? Was it nightly? Did you just tutor dev it, or did you bind-mount the MFEs?

Conclusion

If we agree to not wait for 2U and instead review/test/merge the Gradebook PR ourselves, I think we can merge this.

@kdmccormick
Copy link
Contributor

@arbrandes

Maybe if you can provide more details on your environment? Was it nightly? Did you just tutor dev it, or did you bind-mount the MFEs?

nightly, tutor dev, no bind mounts

Unfortunately there are so many variables at work here that I really cannot tell whether this was a one-off thing with my environment or a real problem with the PR. If it worked for you, then it's more likely my environment.

Thing is, this PR is a release-blocker anyway. If it turns out there is an bug in it, we'll need to delay the release, whether or not it's merged. So, let's just merge, which will allow more people to test it between now and Monday, thus giving us more data on whether it's my environment or an implementation problem.

Copy link
Contributor

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha! I found my testing issue. I still had a bunch of MFE_ settings in config.yml back from when I was working on this task myself. I deleted those, and tutor dev is working great.

Aside from the Gradebook PR, I think this is good to 🚀

@arbrandes arbrandes merged commit 9ad9263 into overhangio:nightly Dec 7, 2022
@arbrandes
Copy link
Collaborator

Huge thanks @ghassanmas (and @kdmccormick and @regisb), and congratulations!

@regisb
Copy link
Contributor

regisb commented Dec 8, 2022

This is an amazing achievement, huge kudos to you three.

arbrandes pushed a commit to openedx/frontend-app-gradebook that referenced this pull request Dec 8, 2022
  This change make it possible if LMS url to be changed, that
  the last value will be picked.

  This is simlair openedx/frontend-app-authoring/pull/389
  which issue overhangio/tutor-mfe/issues/86, the fixes is needed
  so that dynamic config would work with tutor:
  overhangio/tutor-mfe/pull/69
arbrandes pushed a commit to openedx/frontend-app-gradebook that referenced this pull request Dec 8, 2022
  This change make it possible if LMS url to be changed, that
  the last value will be picked.

  This is simlair openedx/frontend-app-authoring/pull/389
  which issue overhangio/tutor-mfe/issues/86, the fixes is needed
  so that dynamic config would work with tutor:
  overhangio/tutor-mfe/pull/69
arbrandes pushed a commit to arbrandes/tutor-mfe that referenced this pull request Dec 9, 2022
When introducing dynamic config[1], `CSRF_TOKEN_API_PATH` was removed
from the MFE build environment and not added to the corresponding Django
settings, leading to POST failures across the board.

This addresses the problem by adding `CSRF_TOKEN_API_PATH` back in.

[1] overhangio#69
arbrandes pushed a commit that referenced this pull request Dec 9, 2022
When introducing dynamic config[1], `CSRF_TOKEN_API_PATH` was removed
from the MFE build environment and not added to the corresponding Django
settings, leading to POST failures across the board.

This addresses the problem by adding `CSRF_TOKEN_API_PATH` back in.

[1] #69
regisb pushed a commit that referenced this pull request Dec 12, 2022
When introducing dynamic config[1], `CSRF_TOKEN_API_PATH` was removed
from the MFE build environment and not added to the corresponding Django
settings, leading to POST failures across the board.

This addresses the problem by adding `CSRF_TOKEN_API_PATH` back in.

[1] #69
navinkarkera pushed a commit to open-craft/tutor-mfe that referenced this pull request Mar 24, 2023
When introducing dynamic config[1], `CSRF_TOKEN_API_PATH` was removed
from the MFE build environment and not added to the corresponding Django
settings, leading to POST failures across the board.

This addresses the problem by adding `CSRF_TOKEN_API_PATH` back in.

[1] overhangio#69

(cherry picked from commit 413ed4d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request release blocker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants